import {createStore,applyMiddleware} from "redux"
import rootReducer from "./reducer"
import {persistReducer} from "redux-persist"
import storage from "redux-persist/lib/storage"
import thunk from "redux-thunk"

const persistConfig={
    key:"@todo@",
    storage
}

const persistedReducer=persistReducer(persistConfig,rootReducer)

export default createStore(persistedReducer,applyMiddleware(thunk))